package log

import (
	"encoding/json"
)

// 用户的操作日志
type OperateLog struct {
	// Who
	User string `json:"user"`
	// When
	Time int64 `json:"time"`
	// What
	Operation string `json:"opearation"`
}

func (o *OperateLog) MustToJSON() []byte {
	v, err := json.Marshal(o)
	if err != nil {
		panic(err)
	}
	return v
}
